﻿using IRepositoryBll;
using IRepositoryDal;
using Microsoft.EntityFrameworkCore;
using RepositoryEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RepositoryDal
{
  public   class MenuInfoDal : BaseDal<MenuInfo>, IMenuInfoDal
    {
        //数据库上文
        RepositoryDbContext _DbContext;

        public MenuInfoDal(RepositoryDbContext DbContext) : base(DbContext)
        {
            _DbContext = DbContext;
        }

        //public void Delete(List<MenuInfo> deleteEntityInfos)
        //{
        //    throw new NotImplementedException();
        //}

        /// <summary>
        /// 菜单备选
        /// </summary>
        /// <returns></returns>
        //public DbSet<MenuInfo> GetMenuDb()
        //{
        //    return _DbContext.MenuInfo;
        //}

        /// <summary>
        /// 根据id获取菜单信息
        /// </summary>
        /// <param name="menuInfoId"></param>
        /// <returns></returns>
        //public MenuInfo GetMenuInfo(string menuInfoId)
        //{
        //    MenuInfo menuInfo = _DbContext.MenuInfo.FirstOrDefault(u => u.ID == menuInfoId);
        //    return menuInfo;
        //}

        /// <summary>
        /// 获取菜单集合
        /// </summary>
        /// <returns></returns>
        //public List<MenuInfo> GetMenuInfos()
        //{
        //    return _DbContext.MenuInfo.ToList();
        //}

        //public DbSet<MenuInfo> GetMenuInfosDb()
        //{
        //    return _DbContext.MenuInfo;
        //}
    }
}
